﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;

namespace DATA
{
    public class HotLineREP
    {
        MODELGENERALDataContext context = new MODELGENERALDataContext();

        public List<HotLineDTO> GetAllHotLines()
        {
            List<HotLineDTO> acc = new List<HotLineDTO>();

            var hotlines = from a in context.HotLines
                          select a;
            foreach (var hotline in hotlines)
            {
                HotLineDTO hotlineDTO = new HotLineDTO();
                hotlineDTO.HotLineID = hotline.hotLineID;
                hotlineDTO.HotLineName = hotline.hotLineName;
                hotlineDTO.Number = hotline.number;
                acc.Add(hotlineDTO);
            }
            return acc;
        }
    }
}
